package arrays;

public class SortArray {
	int a[] = {11,0,8,9,-3,6,12,12,-5,1,2,13,4,7,14};
	
	public void sortArr()
	{
	System.out.println("original array");
	
	for (int i=0;i<a.length;i++) 
		System.out.print(a[i]+" ");
	for(int i=0;i<(a.length-1);i++)
	{
	for (int j=i+1;j<a.length;j++)
	{
	if(a[i]>a[j])
	{
	int x,y;
	x=a[i];
	y=a[j];
	a[i] = y;
	a[j] = x;
	}
	}
	}
   System.out.println();
	System.out.println("Array after sorting in ascending order");
	for (int i=0;i<a.length;i++) 
	System.out.print(a[i]+" ");

	}

	 
	
	

}
